package com.io.jdt;
import java.io.*;
/**
 * ʹ��BufferedReader��BufferedWriter �����ı��ļ�//���ܸ���ͼƬ����Ƶ�ļ�
 * @author ���ڲ�ͬ
 */
public class Jdt3Copy {
	public static void main(String[] args) throws IOException {
		String str;
		FileReader fr; //FileReader����
		FileWriter fw;//FileWriter����
		BufferedReader br = null;//BufferedReader����
		BufferedWriter  bw = null;//BufferedWriter����
		try {
			fr=new FileReader("D:\\�ĵ�\\Java\\S2-Chapter8_File IO\\helloworld.txt");
			fw = new FileWriter("D:\\�ĵ�\\Java\\S2-Chapter8_File IO\\copy.txt");
			br =new BufferedReader(fr);
			bw = new BufferedWriter(fw);
			while( (str=br.readLine())!=null ){
				bw.write(str);
				bw.newLine();
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
				try {
					bw.flush();
					br.close();
					bw.close();
				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
		}
		
	}
	
	
	
	
}
